package com.zheng.damo01.作业;

import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.Random;

public class Test04 {
    public static void main(String[] args) {
        double count =new Random().nextDouble()*100;
        System.out.println("随机数为"+count);
        BigDecimal bd=new BigDecimal(count);
        System.out.println("转换为：");
        System.out.println(bd.divide(new BigDecimal(1), 2, RoundingMode.HALF_UP));
    }
}
